home *** CD-ROM | disk | FTP | other *** search
/ Visual Basic Source Code / Visual Basic Source Code.iso / vbsource / object1a / frmscrol.frm (.txt) next >
Visual Basic Form  |  1999-10-17  |  3KB  |  93 lines

  1. VERSION 5.00
  2. Begin VB.Form frmScroll 
  3.    BorderStyle     =   3  'Fixed Dialog
  4.    Caption         =   "Object Scroll Example"
  5.    ClientHeight    =   3675
  6.    ClientLeft      =   45
  7.    ClientTop       =   330
  8.    ClientWidth     =   4680
  9.    LinkTopic       =   "Form1"
  10.    MaxButton       =   0   'False
  11.    MinButton       =   0   'False
  12.    ScaleHeight     =   3675
  13.    ScaleWidth      =   4680
  14.    ShowInTaskbar   =   0   'False
  15.    StartUpPosition =   3  'Windows Default
  16.    Begin VB.CommandButton Command2 
  17.       Caption         =   "Scroll Down"
  18.       BeginProperty Font 
  19.          Name            =   "Arial"
  20.          Size            =   8.25
  21.          Charset         =   0
  22.          Weight          =   400
  23.          Underline       =   0   'False
  24.          Italic          =   0   'False
  25.          Strikethrough   =   0   'False
  26.       EndProperty
  27.       Height          =   375
  28.       Left            =   720
  29.       TabIndex        =   1
  30.       Top             =   3240
  31.       Width           =   1215
  32.    End
  33.    Begin VB.CommandButton Command1 
  34.       Caption         =   "Scroll Up"
  35.       BeginProperty Font 
  36.          Name            =   "Arial"
  37.          Size            =   8.25
  38.          Charset         =   0
  39.          Weight          =   400
  40.          Underline       =   0   'False
  41.          Italic          =   0   'False
  42.          Strikethrough   =   0   'False
  43.       EndProperty
  44.       Height          =   375
  45.       Left            =   2760
  46.       TabIndex        =   0
  47.       Top             =   3240
  48.       Width           =   1215
  49.    End
  50.    Begin VB.Line Line2 
  51.       BorderColor     =   &H00FFFFFF&
  52.       X1              =   120
  53.       X2              =   4440
  54.       Y1              =   3000
  55.       Y2              =   3000
  56.    End
  57.    Begin VB.Line Line1 
  58.       BorderColor     =   &H00808080&
  59.       BorderWidth     =   2
  60.       X1              =   120
  61.       X2              =   4440
  62.       Y1              =   3000
  63.       Y2              =   3000
  64.    End
  65.    Begin VB.Label Label1 
  66.       Appearance      =   0  'Flat
  67.       BackColor       =   &H80000005&
  68.       BackStyle       =   0  'Transparent
  69.       BorderStyle     =   1  'Fixed Single
  70.       Caption         =   "This label object will be used to scroll up or down.            Visit - www.fpsoftware.bizland.com"
  71.       ForeColor       =   &H80000008&
  72.       Height          =   495
  73.       Left            =   480
  74.       TabIndex        =   2
  75.       Top             =   120
  76.       Width           =   3615
  77.    End
  78. Attribute VB_Name = "frmScroll"
  79. Attribute VB_GlobalNameSpace = False
  80. Attribute VB_Creatable = False
  81. Attribute VB_PredeclaredId = True
  82. Attribute VB_Exposed = False
  83. Private Sub Command1_Click()
  84. If Label1.Top = 120 Then: Exit Sub 'The object will not Scroll Up if Top = "120"
  85. Label1.Top = (Label1.Top - 2) 'Make this number higher to create a faster scroll
  86. Loop Until Label1.Top = 120 ' Loops code until it reaches its destination
  87. End Sub
  88. Private Sub Command2_Click()
  89. If Label1.Top = 2400 Then: Exit Sub 'The object will not scroll down if Top = "2400"
  90. Label1.Top = (Label1.Top + 2) 'Make this number higher to create a faster scroll
  91. Loop Until Label1.Top = 2400 ' Loops code until it reaches its destination
  92. End Sub
  93.